package com.ruoyi.system.mapper.shopping;

import com.ruoyi.system.domain.shopping.Address;
import com.ruoyi.system.domain.shopping.ShoppingCart;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

@Mapper
public interface ShoppingCartMapper {

    List<ShoppingCart> selectList(Integer userId);

    List<ShoppingCart> selectListByIds(@Param("ids") Integer[] shoppingCartIds);

    int deleteByIds(@Param("ids") Integer[] shoppingCartIds);

    int selectListByUserIdAndProductId(@Param("userId")Integer userId, @Param("productId")Integer productId);

    int updateByUserIdAndProductId(@Param("userId")Integer userId, @Param("productId")Integer productId);

    int insert(ShoppingCart shoppingCart);

    int selectProductCountByUserId(Integer userId);

    int updateNum(ShoppingCart shoppingCart);

    int deleteById(Integer shoppingCartId);
}
